@extends('huweize.layouts.userHome')
@section('title','作家资料-阅文作家专区')
@section('main')
    <div class="col-md-12 talkHeader">
        <h3>消息通知</h3>
    </div>
    <div class="col-md-12 talkYear">
        <span>选择年份:</span>
        <span class="dropdown">
            <button class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                2017
                <span class="caret"></span>
            </button>
            <ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
                <li><a href="#">2016年</a></li>
            </ul>
            &nbsp;&nbsp;&nbsp;
            <a href="" class="btn btn-info">查看</a>
            <a href="{{url('huweize/home/message/delall/'.session('writerid'))}}" class="btn btn-info seek" style="margin-top: 8px;">
                清空消息
            </a>
        </span>
    </div>
    @if(count($List))
        <div class="msgListWrap">
            {{--消息例表--}}
            <ul id="consultList">
                @foreach($List as $k)
                    <li data-msgid="1848127">
                        <div class="msgText">
                            <p>
                                <em>{{date('Y-m-d H:i:s',$k->uptime)}}</em>
                                <span>
                                来自管理员的回复
                            </span>
                            </p><div class="reply-content">
                                <p class="btn fr">
                                    <a data-node="deleteBtn" data-msgid="1848127" href="{{url('huweize/home/message/del/'.$k->id)}}">删除</a>
                                </p>
                                <p class="default">{{$k->text}}</p>
                            </div>
                        </div>
                        @endforeach
                    </li>
            </ul>
        </div>

    @else
        <div class="col-md-12 talkWrap">
            <div class="talk-box">
                <p>
                    <img src="{{asset('/home/image/nomessages.png')}}" alt="">
                </p>
                <span>暂无消息</span>
            </div>
        </div>
    @endif
@endsection